Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove -lgcc_s from the list of library dependencies in .pc file #218

Merged

Conversation

marecki315
Copy link
Contributor

When -lgcc_s is in the list of required libraries in .pc, it's impossible to avoid dependency to dynamic libgcc_s.so when linking gcc statically inside target binary using -static-libgcc option.

When `-lgcc_s` is in the list of required libraries in .pc, it's
impossible to avoid dependency to dynamic `libgcc_s.so` when linking
gcc statically inside target binary using `-static-libgcc` option.
@adamjw24 adamjw24 requested a review from lehmann-c November 25, 2024 13:13
@K-os
Copy link
Collaborator

K-os commented Nov 27, 2024

What happens when you build libvvdec with -static-libgcc ? On my machine that does not add -lgcc_s as a dependency.

@marecki315
Copy link
Contributor Author

marecki315 commented Nov 27, 2024

The issue doesn't appear when building libvvdec, but when building a project (application or library) that uses libvvdec and pkgconfig to find the dependency.
If you try to build a binary and link libvvdec statically, these dependencies specified in .pc file will be added:

Libs.private: -lstdc++ -lm -lgcc -lgcc -lgcc_s

When using -static-libgcc, the -lgcc dependency won't appear in target app/lib, but -lgcc_s will still be there.

It is enough to have only -lgcc in Libs.private. -lgcc_s is unnecessary because either libgcc.a or libgcc_s.so needs to be linked.

https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html

@K-os
Copy link
Collaborator

K-os commented Dec 6, 2024

Ok, I understand this is also a problem, when the project using libvvdec is linked with -static not necessarily -static-libgcc. So I guess we should merge this.

@adamjw24 adamjw24 merged commit 189c9f8 into fraunhoferhhi:master Dec 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants